package com.joven.shelltest.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.joven.shelltest.utils.mybatisplusdim.CustomTypeHandler;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @Author wzj
 * @Date 2023-08-03 17:30
 **/
@Data
@TableName("sys_user")
public class SysUserModel implements Serializable {
    private static final long serialVersionUID = -5354312749998890479L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField(value = "user_name")
    private String userName;

    @TableField(value = "nick_name")
    private String nickName;

    @TableField(value = "password")
    private String password;

    @TableField(value = "status")
    private Integer status;

    @TableField(value = "email", typeHandler = CustomTypeHandler.class)
    private String email;

    @TableField(value = "mobile")
    private String mobile;

    @TableField(value = "sex")
    private Integer sex;

    @TableField(value = "create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

    @TableField(value = "modify_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime modifyTime;

    @TableField(value = "del_flag")
    private Integer delFlag;

    @TableField(value = "remark")
    private String remark;

}
